//
//  EmojTextAttachment.m
//  SinaWebo
//
//  Created by wwj on 16/5/19.
//  Copyright © 2016年 亦心. All rights reserved.
//

#import "EmojTextAttachment.h"

@implementation EmojTextAttachment
+(instancetype)emojTextAttachment:(EmotionModel *)emotion font:(UIFont *)font{
    EmojTextAttachment *attach = [[EmojTextAttachment alloc] init];
    attach.image = [UIImage imageNamed:emotion.emtionPath];
    attach.bounds = CGRectMake(0, -4, font.lineHeight, font.lineHeight);
    attach.chs = emotion.chs;
    return attach;
}

+(instancetype)emojTextAttachmentWithImageName:(NSString *)imageName font:(UIFont *)font{
    EmojTextAttachment *attach = [[EmojTextAttachment alloc] init];
    attach.image = [UIImage imageNamed:imageName];
    attach.bounds = CGRectMake(0, -3, font.lineHeight, font.lineHeight);
    return attach;
}
@end
